using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Drawing;

namespace Possan.Graphics.Filters
{						  
	public class AddPadding : IBaseFilter
	{
		public int Left;
		public int Top;
		public int Right;
		public int Bottom;

		public string ParameterDefinition
		{
			get
			{
				     return null;
			}
		}


		public AddPadding()
		{
			Left = 0;
			Top = 0;
			Right = 0;
			Bottom = 0;
		}

		public Bitmap Filter(Bitmap bitmap)
		{
			int nw = bitmap.Width + Left + Right;
			int nh = bitmap.Height + Top + Bottom;
			Bitmap bmp2 = new Bitmap(nw, nh);
			bmp2.SetResolution(bitmap.HorizontalResolution, bitmap.VerticalResolution);
			System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bmp2);
			g.DrawImage(bitmap, Left, Top);
			     return bmp2;
		}				 
	}
}





